package main

import (
	"fmt"
	"mudsv/app"
	"mudsv/conf"
	"mudsv/core"
	"mudsv/core/cmdline"
	"mudsv/core/schedule"
	"mudsv/core/sv-main"
)

func main() {
	fmt.Println("dsadsad")

	if !app.Init() {
		return
	}
	if !conf.InitMapAll() {
		return
	}
	if !conf.InitExtGame() {
		return
	}

	svMain := sv_main.GetServeMain()
	core.AddSv(svMain)

	svSchedule := schedule.NewSvSchedule()
	ScheduleRegister(svSchedule)
	core.AddSv(svSchedule)

	svCmd := cmdline.NewSvCmd()
	CmdRegister(svCmd)
	core.AddSv(svCmd)

	go core.StartSv()

	app.WaitTermSignal()
}
